set(FOLDER_NAME Base)
set(LIBRARY_NAME Data)

set(CURRENT_INCLUDE_FILE_PATH ${INCLUDE_FILE_PATH}/${FOLDER_NAME}/${LIBRARY_NAME})
set(CURRENT_SOURCE_FILE_PATH ${SOURCE_FILE_PATH}/${FOLDER_NAME}/${LIBRARY_NAME})

file(GLOB PUBLIC_FILES ${CURRENT_INCLUDE_FILE_PATH}/*.h)
source_group("Public Files" FILES ${PUBLIC_FILES})

file(GLOB HEADER_FILES ${CURRENT_SOURCE_FILE_PATH}/*.h)
source_group("Header Files" FILES ${HEADER_FILES})

file(GLOB SOURCE_FILES ${CURRENT_SOURCE_FILE_PATH}/*.cpp)
source_group("Source Files" FILES ${SOURCE_FILES})

set(LIBRARY_SRCS ${PUBLIC_FILES} ${HEADER_FILES} ${SOURCE_FILES})
add_library(${LIBRARY_NAME} SHARED ${LIBRARY_SRCS})
add_library(${PROJECT_NAME}::${LIBRARY_NAME} ALIAS ${LIBRARY_NAME})
set_target_properties(${LIBRARY_NAME} PROPERTIES FOLDER ${FOLDER_NAME})

target_include_directories(${LIBRARY_NAME}
    PUBLIC
    ${CURRENT_INCLUDE_FILE_PATH}
)

if(WIN32)
    install(TARGETS ${LIBRARY_NAME}
        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    )
else(WIN32)
    install(TARGETS ${LIBRARY_NAME}
        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    )
endif(WIN32)
